package com.ly.houses.service.impl;

import com.ly.houses.mapper.HouseMapper;
import com.ly.houses.model.House;
import com.ly.houses.service.HouseService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class HouseServiceImpl implements HouseService {
    @Resource
    private HouseMapper houseMapper;
    @Override
    public void batchSave(List<House> buildings) {
        houseMapper.batchSave(buildings);
    }
    @Override
    public void batchDelete(List<House> buildings) {
        houseMapper.batchDelete(buildings);
    }

    @Override
    public void batchUpdate(List<House> buildings) {
        houseMapper.batchUpdate(buildings);
    }



    @Override
    public List<House> listHouseByBuildingId(Long buildingId) {
        return houseMapper.listHouseByBuildingId(buildingId);
    }

    @Override
    public House get(Long houseId) {
        return houseMapper.get(houseId);
    }
}
